package com.hecore.lagou.mr.output;

import org.apache.hadoop.io.NullWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Reducer;

import java.io.IOException;

/**
 * @Author: hecore
 * @Date: 2020/10/18 21:58
 * @Description:
 */

public class OutPutReducer extends Reducer<Text, NullWritable,Text, NullWritable> {

    /**
     * reducer关注 key和输出的处理
     * @param key
     * @param values
     * @param context
     * @throws IOException
     * @throws InterruptedException
     */
    @Override
    protected void reduce(Text key, Iterable<NullWritable> values, Context context) throws IOException, InterruptedException {
        context.write(key,NullWritable.get());
    }
}
